package cn.com.twoke.application.game.mario.game.component;

import cn.com.twoke.application.game.mario.core.ecs.component.Component;
import cn.com.twoke.application.game.mario.game.config.GameConfig;
import cn.com.twoke.application.game.mario.game.config.Settings;

public class JumpComponent implements Component {
    private static final GameConfig config = GameConfig.getInstance();

    public boolean isJumping = false;       // 是否正在跳跃
    public float jumpForce = Settings.jumpForce();         // 初始跳跃力度
    public float currentJumpTime = 0f;      // 当前跳跃时间
    public float maxJumpTime = 0.2f;        // 最大跳跃持续时间
    public float coyoteTime = config.getPlayerCoyoteTime();         // 离地后仍可跳跃的缓冲时间
    public float coyoteTimer = 0f;          // 当前缓冲计时
    public boolean jumpRequested = false;   // 跳跃请求标记


}